.class Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;
.super Ljava/lang/Object;
.source "BackButtonBlocker.java"


# instance fields
.field private final mBlockTime:J

.field private mStartBlockingTime:J


# direct methods
.method constructor <init>(J)V
    .locals 0
    .parameter "blockTime"

    .prologue
    .line 43
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 44
    iput-wide p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->mBlockTime:J

    .line 45
    return-void
.end method

.method private isBlocked()Z
    .locals 4

    .prologue
    .line 79
    iget-wide v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->mStartBlockingTime:J

    iget-wide v2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->mBlockTime:J

    add-long/2addr v0, v2

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    cmp-long v0, v0, v2

    if-lez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


# virtual methods
.method blocked(I)Z
    .locals 1
    .parameter "keyCode"

    .prologue
    .line 70
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    invoke-direct {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->isBlocked()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method getBlockTime()J
    .locals 2

    .prologue
    .line 53
    iget-wide v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->mBlockTime:J

    return-wide v0
.end method

.method startBlocking()V
    .locals 2

    .prologue
    .line 60
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/BackButtonBlocker;->mStartBlockingTime:J

    .line 61
    return-void
.end method
